minecraftbedrockfandomcom-20200215-history
Commands
Commands (AKA Cheats) are actions entered by the Player which make a certain action occur in automatically. Commands were added in Update 0.16.0. Usage Commands are mostly used to make any action in-game happen automatically, such as Mob spawning, Block placing, inflicting Status Effects, teleporting, etc. To execute a command The Player must enter Chat, precede the command with a forward slash, give the arguments and hit the return key. For devices having the Tab-key, it can be used to complete parts of the commands. When typing, possible completion will show. Commands can also be used by entering them in a Command Block. Note that for Commands to work, "Cheats" needs to be enabled, which in turn will disable achievements. To turn on cheats, go to Settings > Game > Cheats: On. List of Commands ''For a more detailed list, see here. '' The current commands in Minecraft Pocket Edition are- * - Sets a player's ability (requires Education Edition features enabled) * or /daylock - Locks and unlocks the day-night cycle * - Clears The Player's inventory * – Copies blocks from one place to another * - connects to a server in-game (Update 1.0) * – Revoke operator status from a player * - Changes the difficulty * - Grants a status effect to an entity * – Enchants a player's item * – Executes another command * – Fills a region with a specific block * – Runs a command found in the corresponding function file * – Sets a player's gamemode * – Sets a game rule value * – Gives an item to a player * – Provides help for commands * - Sets the immutable state of a world (requires Education Edition features enabled) * – Kills entities (players, mobs, items, etc.) * – Lists players on the server * - Locates the nearest selected structure (Update 1.0) * - Displays custom chat message starting with player's name * - Mixer interactivity control * - Controls what mob events are allowed to run * – Grants operator status to a player * – Creates a particle emitter * – Plays a built-in sound * – reloads all functions from all behavior packs * – Replaces inventory items * – Displays a message to multiple players * – Tracks and displays scores for various objectives * – Changes a block to another block * – Sets the maximum number of players for the current game session * – Sets the world spawn point * – Sets spawn point for a player * – Teleports entities to random locations within a radius * – Stops a currently playing sound * – Summons an entity * - Manages tags stored in entities * or /msg or /w – displays a private message to other players * - Sends a JSON message to players * – Tests for a player or other entity * – Tests whether a block is in a location * – Tests whether the blocks in two regions match * – Sets areas that update without any Players in them * – Changes or queries the world's game time * – Displays screen titles * – Displays screen titles with JSON messages * – Toggles the weather * or /teleport]] – Teleports entities * – Transfer into another server in-game * - Attempts to connect to a websocket server to send a video * - Performs a videostream related action * – Sets the weather * or /wb - Toggle World Builder status of a caller. (requires Education Edition features enabled) * – Attempts to connect to the websocket server on the provided URL. Used by developers * – Adds or removes player experience Command arguments Most commands accept arguments, i.e., where the first part indicates what the arguments refer to, and the second part refers to the type of argument. In the example given a Player identifies a player by using a target type argument. The different types of arguments are described in this section. string Any combination of alphanumeric characters. int A number, which might have range associated with it. Negative numbers are possible. Positional counts are zero-based - e.g., the first slot in a player's 36-slot inventory is referred to in commands as zero and the last is 35. x y z A coordinate set of int's denoting a coordinate. The x value indicates distance towards the East from the origin. The y value indicates height above bedrock. The z value indicates distance towards North from the origin. Note that to use The Player's position one can use tilde '~' or caret '^' offsets. I.e. the command /tp ~5 ~ ~-10 would move The Player 5 meters/blocks to the East, keep the height, and 10 meters/blocks to the South (as it is a negative offset), and /tp ^5 ^ ^-10 would move The Player 5 meters/blocks to the player's perceived right, keep the height, and 10 meters/blocks backward (as it is a negative offset). Target Instead of specifying coordinates, some commands allow specifying a target. This can relate both to players and entities. * @a – All players * @e – All entities * @p – Nearest players * @r – Random player(s) * @s – Yourself These selector arguments can be further specified using text like in /kill @etype=cow,r=10 which would kill all cows within a radius of 10 meters/blocks. Trivia *Commands have been used in many Multiplayer Servers even before they were officially released. However, this was done through Plugins. *Commands were originally slated for Update 0.15.0, however, they were not added. *As of Update 1.2 common commands have a User interface in Chat. *In the Update 1.0.5 Beta, there was a /particle command. However. it was removed due to functional issues, but was re-added in Update 1.8. Category:Game Mechanics Category:Technical Category:Update 0.16.0